Conventionally, there is technology to compensate for interruption of coordinate data outputted from a coordinate input device such as a touch panel. For example, there is conventional technology in which when a touch-off time is shorter than a predetermined time, it is determined that a contact state continues.
However, in the above conventional technology, whether or not a contact state continues is determined by whether or not a touch-off time is shorter than a predetermined time (a fixed time). Thus, an erroneous determination is often made depending on a way in which an input operation is performed by an operator.
It is a feature of the technology disclosed herein to provide a computer-readable storage medium, an information processing apparatus, an information processing system, and an information processing method which can appropriately process input data outputted from a predetermined input device.
The feature described above is attained by, for example, the following configuration examples.
A first configuration example is a computer-readable storage medium having stored therein an information processing program for processing input data outputted from a predetermined input device. The information processing program causes a computer to operate as: a following value calculator configured to calculate a following value which follows a target value which is set on the basis of the input data; and an interruption compensator configured to determine that input continues and correct the input data, if the following value satisfies a predetermined condition when output of the input data from the input device is interrupted.
The “input device” may be any device which outputs input data corresponding to an input operation of the operator, and is a touch panel as an example. The “target value which is set on the basis of the input data” may be an input value or may be another value (an allowance coordinate described later) updated in accordance with an input value. The “following value” is, for example, a value which is controlled so as to gradually approach the target value even when the target value stops. “To determine that input continues and correct the input data” may be to complement input data for a period when the output of the input data from the input device is interrupted, or may be to set information indicating an input state, to an inputting state.
The information processing program can be stored in any computer-readable storage medium (e.g., a flexible disc, a hard disk, an optical disc, a magneto-optical disc, a CD-ROM, a CD-R, a magnetic tape, a semiconductor memory card, a ROM, a RAM, etc.).
A period during which, when the output of the input data from the input device is interrupted, the interruption compensator determines that input continues may increase as a change amount of the input data immediately before the output of the input data from the input device is interrupted increases.
Further, the predetermined input device may be a coordinate input device, the input data may be input coordinate data indicating a contact position with respect to an operation surface of the coordinate input device, the target value may be a target coordinate which is set on the basis of the input coordinate data, and the following value may be a following coordinate which follows the target coordinate. When the contact position indicated by the input coordinate data is interrupted, if the following coordinate satisfies a predetermined condition, the interruption compensator may determine that contact continues even during a period when the contact position indicated by the input coordinate data is interrupted, and may correct the input coordinate data.
The predetermined condition may be a condition regarding a change amount of the following value per unit time.
Further, when the output of the input data is interrupted, if the change amount of the following value per unit time is equal to or more than a predetermined value, the interruption compensator may determine that input continues even during a period when the output of the input data is interrupted, and may correct the input data.
Further, the predetermined condition may be a condition regarding a difference between the following value and the target value.
Further, when the output of the input data is interrupted, if the difference between the following value and the target value is greater than a predetermined value, the interruption compensator may determine that input continues even during a period when the output of the input data is interrupted, and may correct the input data.
Further, the following value calculator may calculate the following value such that the following value follows the target value at a predetermined rate.
The “predetermined rate” may be a constant or may be a variable which changes in response to a situation, such as a following rate described later.
Further, the following value calculator may update the following value such that a difference between the following value and the target value decreases at the predetermined rate.
Further, the following value calculator may update the following value such that the following value approaches the target value by a value obtained by multiplying a difference between the following value and the target value by the predetermined rate.
Further, when a difference between the target value and an input value indicated by the input data is greater than a predetermined value, the target value may change such that the difference becomes the predetermined value.
The “predetermined value” may be a constant or may be a variable which changes in response to a situation, such as an allowance radius described later.
Further, the interruption compensator may correct the input data in real time.
Further, when the output of the input data is interrupted, if the following value satisfies the predetermined condition, the interruption compensator may complement input data for a period when the output of the input data is interrupted, by using the following value.
Further, when the contact position indicated by the input coordinate data is interrupted, if the following coordinate satisfies the predetermined condition, the interruption compensator may complement a contact position for a period when the contact position indicated by the input coordinate data is interrupted, on the basis of an interval of the contact position indicated by the input coordinate data and a moving direction of the following coordinate.
A second configuration example is an information processing apparatus for processing input data outputted from a predetermined input device. The information processing apparatus comprises: a following value calculator configured to calculate a following value which follows a target value which is set on the basis of the input data; and an interruption compensator configured to determine that input continues and correct the input data, if the following value satisfies a predetermined condition when output of the input data from the input device is interrupted.
A third configuration example is an information processing system for processing input data outputted from a predetermined input device. The information processing system comprises: a following value calculator configured to calculate a following value which follows a target value which is set on the basis of the input data; and an interruption compensator configured to determine that input continues and correct the input data, if the following value satisfies a predetermined condition when output of the input data from the input device is interrupted.
A fourth configuration example is an information processing method executed by a computer of an information processing system for processing input data outputted from a predetermined input device. The information processing method comprises the steps of: calculating a following value which follows a target value which is set on the basis of the input data; and determining that input continues and correcting the input data, if the following value satisfies a predetermined condition when output of the input data from the input device is interrupted.
According to the technology, it is possible to appropriately process input data outputted from a predetermined input device.
These and other objects, features, aspects and advantages of the technology will become more apparent from the following detailed description of non-limiting example embodiments when taken in conjunction with the accompanying drawings.